<?php
  // no direct access
  defined( '_JEXEC' ) or die( 'Restricted access' );
  jimport('joomla.application.component.controller');
  include('base.php');

  class PositionController extends BaseController
  {
    var $_name = 'position';

    function save()
    {
      $data = JRequest::get('POST');
      $data['description'] = JRequest::getVar( 'description', '', 'post', 'string', JREQUEST_ALLOWHTML );
       
      $model = & $this->getModel($this->_name); 
      
      $model->save($data);
       
      $redirectTo = JRoute::_('index.php?option='.JRequest::getVar('option').'&c='.JRequest::getVar('c'), false);
      $this->setRedirect($redirectTo,  ucfirst($this->_name) . ' Saved!');             
    }    
  }
?>